package cn.factorybox.item.service;

import cn.factorybox.model.entity.FactoryDevice;
import cn.factorybox.model.entity.FactoryJudgeValue;
import cn.factorybox.model.entity.FactoryDeviceData;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-09-13 14:49
 */
public interface FactoryDeviceDataService {
    Map<String, Object> getThresholdValue();

    Map<String, Object> getNewestData(String fSerialNumber);

    Map<String, Object> getPeak(String fSerialNumber);

    Map<String, Object> getChangeCurveData(String fSerialNumber);

    Map<String, Object> getSatisfy(String fSerialNumber);

    Map<String, Object> getAbnormalDataList(String fSerialNumber);

    int deleteData(String id);

    void editThreshold(Map<String, Object> map);

    int judgeData(FactoryDeviceData factoryDeviceData);

    Map<String, Object> selectOneDeviceData(Map<String,Object> map);

    int deleteAbnormalData(String id);

    Map<String, Object> getAbnormalMessageList(Map<String,Object> map);

    void updateThreshold(FactoryJudgeValue factoryJudgeValue);

    int saveFactoryDeviceData(FactoryDeviceData factoryDeviceData, int count);

    Map<String,Object> selectDataListByRoomIdAndDate(String roomId, String date);

    List<FactoryDevice> selectAllDeviceDataStatue(HttpServletRequest request) throws Exception;

    List<Map<String, Object>> selectManagerHomeState(HttpServletRequest request);
}
